package com.it2297.view;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JToolBar;
import javax.swing.border.EmptyBorder;

import com.it2297.controller.ProductController;
import com.it2297.main.App;

public class CustomerOrderListDialog extends JDialog {
	private ProductController pc = new ProductController();
	private final static JScrollPane scrollPane = new JScrollPane();

	
	public CustomerOrderListDialog() {
		super(App.getMain(), true);
		this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
		setTitle("Order item");
		pc = new ProductController(this);
		initGUI();
		this.pack();
		setLocationRelativeTo(null);
	}
	private void initGUI() {
		getContentPane().setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		getContentPane().add(scrollPane);
	}
	public static void setPanel(JPanel panel) {
		getScrollpane().getViewport().removeAll();
		getScrollpane().setViewportView(panel);
	}

	public static JScrollPane getScrollpane() {
		return scrollPane;
	}

}
